package com.hxzy.controller.cellinfo;

import com.github.pagehelper.PageInfo;
import com.hxzy.common.BaseServlet;
import com.hxzy.dto.CellinfoDTO;
import com.hxzy.entity.Cellinfo;
import com.hxzy.service.cellinfoService;
import com.hxzy.service.impl.cellinfoSerxiceIpml;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @Description:
 * @Author: YangYong
 * @Date: 2022/3/8 21:55
 */
@WebServlet(urlPatterns = "/cellinfo/selectall")
public class cellinfo_selectAll extends BaseServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.startPage(req);
        try {
            //2、收集参数
            CellinfoDTO cellinfoDTO = super.CollectiongParameterVlues(req, CellinfoDTO.class);
            //3、查询数据
            cellinfoService cellinfoService=new cellinfoSerxiceIpml();
            List<Cellinfo> all = cellinfoService.searchall(cellinfoDTO);
            //返回给客户端
            super.render(resp,new PageInfo(all));

        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
